<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<style type="text/css">
	


</style>
<body>
	<h1>aaaaaaaaaaaaaaaaaaaaaaaaaa</h1>
	<h1>aaaaaaaaaaaaaaaaaaaaaaaaaaa</h1>
	<h1>aaaaaaaaaaaaaaaaaaaaaaaaaaa</h1>
	<h1>aaaaaaaaaaaaaaaaaaaaaaaaaaaa</h1>
	<h1>aaaaaaaaaaaaaaaaaaaaaaaaaaaa</h1>
</body>
<script type="text/javascript">
	objs=document.getElementsByTagName('h1');
	for(i=0;i<objs.length;i++){
		objs[i].setAttribute('num',i+1);
		objs[i].onclick=function(){
			this.innerHTML=this.getAttribute('num');
		}
	}


</script>
</html>